package com.ktg.mes.erpClient.task;

import com.ktg.common.exception.BussinessException;
import com.ktg.mes.erpClient.service.IErpCustomerService;
import com.ktg.mes.erpInventory.service.IErpInventoryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * ERP - 存货档案 定时任务调度
 * 
 * @author ruoyi
 */
@Slf4j
@Component("erpCustomerSyncDataTask")
public class ErpCustomerSyncDataTask
{
    @Autowired
    private IErpCustomerService iErpCustomerService;

    public void execute()
    {
        try {
            iErpCustomerService.syncDataListFromErp();
        }catch (Exception ex){
            log.error("同步ERP 信息出错",ex);
            throw new BussinessException("执行失败");
        }
    }
}
